const SAS1022 = {
  'type': 'object',
  'required': [
    'entityInformation',
    'principalAuthorizedCompSigner',
    'commissionPayment',
    'backgroundInformation',
    'errorsOmissions',
    'fairCreditReporting',
    'formNumber',
    'formVersion'
  ],
  'properties': {
    'typeOfAppointment': {
      'allOf': [
        {
          '$ref': 'defsSchema.json#/definitions/typeOfAppointment'
        },
        {
          'properties': {
            'apptType': {
              'type': 'string',
              'enum': [
                'Corporation',
                'Partnership',
                'Association',
                'Limited Liability Corporation',
                'Limited Liability Partnership'
              ]
            },
            'productsInterestedSelling': {
              'type': 'array',
              'description': 'What products are you interested in selling?',
              'items': [
                {
                  'type': 'string',
                  'enum': [
                    'Life Insurance',
                    'Annuities',
                    'Group/Stop Loss/Employee Benefits',
                    'Life and Disability',
                    'Other'
                  ]
                }
              ]
            },
            'productsInterestedSellingOther': {
              'type': 'string',
              'description': 'Other products interested in selling'
            },
            'referringWholesaler': {
              'type': 'string',
              'description': 'Referring Wholesaler/Sales Rep'
            }
          }
        }
      ]
    },
    'entityInformation': {
      '$ref': 'defsSchema.json#/definitions/entityInformation'
    },
    'entityLicensesRegistration': {
      '$ref': 'defsSchema.json#/definitions/entityLicensesRegistration'
    },
    'principalAuthorizedCompSigner': {
      '$ref': 'defsSchema.json#/definitions/principalAuthorizedCompSigner'
    },
    'commissionPayment': {
      '$ref': 'defsSchema.json#/definitions/commissionPayment'
    },
    'backgroundInformation': {
      '$ref': 'defsSchema.json#/definitions/backgroundInformation'
    },
    'errorsOmissions': {
      '$ref': 'defsSchema.json#/definitions/errorsOmissions'
    },
    'fairCreditReporting': {
      '$ref': 'defsSchema.json#/definitions/fairCreditReporting'
    },
    'formNumber': {
      'type': 'string',
      'enum': ['SAS1022']
    },
    'formVersion': {
      'type': 'string'
    }
  }
};

module.exports = { SAS1022 };
